/**
 * Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. All Rights Reserved.
 * SPDX-license-identifier: BSD-3-Clause
 */
 import {IconCaretRight} from '@arco-design/web-react/icon'
 import { useSearchParams,useNavigate } from 'react-router-dom';
interface IProps {
  trainingid?: number;
  title?: string;
}
export default function (props: IProps) {
    const {trainingid,title}=props
    const navigate = useNavigate();
    const toRecordPage=()=>{
      //@ts-ignore
      const encodedText = encodeURIComponent(title);
        navigate(`/practiceRecord?trainingid=${trainingid}&title=${encodedText}`,{ replace: false })
    }
     return (<span onClick={toRecordPage}>训练记录<IconCaretRight style={{color:'#DB0007'}}/></span>);
 }
 